#include "comtradeanalogchannel.h"

ComtradeAnalogChannel::ComtradeAnalogChannel(QObject *parent)
    : QObject{parent}
{

}

ComtradeAnalogChannel::~ComtradeAnalogChannel()
{
}

void ComtradeAnalogChannel::parse_init(QByteArray &data)
{
    QList<QByteArray> tokens = data.split(',');

    m_An = tokens.value(0);
    m_ch_id = tokens.value(1);
    m_ph = tokens.value(2);
    m_ccbm = tokens.value(3);
    m_uu = tokens.value(4);
    m_a = tokens.value(5).toFloat();
    m_b = tokens.value(6).toFloat();
    m_skew = tokens.value(7).toFloat();
    m_min = tokens.value(8).toFloat();
    m_max = tokens.value(9).toFloat();
    m_primary = tokens.value(10).toFloat();
    m_secondary = tokens.value(11).toFloat();
    m_ps = tokens.value(12);
}
